package band.wukong.practice.springboot.spring4.advanced.async;

import band.wukong.practice.springboot.spring4.ext.logback.LogbackLoader;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author wukong(wukonggg@139.com)
 */
public class AsyncTaskApplication {

    public static void main(String[] args) {
        LogbackLoader.load();

        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(AsyncTaskExecutorConfig.class);

        AsyncTaskService service = context.getBean(AsyncTaskService.class);
        for (int i = 0; i < 10; i++) {
            service.executeaAyncTask(i);
            service.executeAsyncTaskPlus(i);
        }
    }

}
